package com.getway.client;

import com.common.contant.RestResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

import java.util.Map;

/**
 * @Author: sijunqiang
 * @Date: 2020/5/27 19:00
 * @Description: 图片上传
 */
@FeignClient(name = "upload-service", url = "${upload-service.url}")
public interface UploadClient {


    /**
     * 上传图片到本地
     */
    @PostMapping(value = "/image")
    String uploadImage(@RequestParam(value = "file") MultipartFile file);


    /**
     * 上传图片到aly
     */
    @GetMapping(value = "/signature")
    RestResponse<Map<String, Object>> getAliSignature();


}
